1. Field of the Invention
The present invention relates to a virtualization system for supporting at least two operating systems and a resource allocation method of the virtualization system. More particularly, the present invention relates to a method for allocating hardware resources on multiple cores of the virtualization system supporting at least two operating systems and a system for executing the resource allocation method.
2. Description of the Related Art
FIG. 1 is a diagram illustrating a configuration of a virtualization system according to related art.
Referring to FIG. 1, the virtualization system supporting at least two operating systems is capable of utilizing resources efficiently on multiple cores. An operating system running on the virtualization layer acts as if it occupies the corresponding hardware resource wholly on its own.
The virtualization software operates in a similar way as a scheduler of the operating system. Accordingly, the virtualization software schedules the individual operating systems running on the virtualization layer as tasks. The operating systems are assigned time resources in a predetermined ratio. In order for the at least two operating systems to share a hardware resource, each operating system use the time resources in up to a predetermined number of time slots (t). How to allocate time resources for each operating system is described below with reference to FIG. 2.
FIG. 2 is a diagram illustrating a method for a plurality of operating systems to share a resource according to related art.
Referring to FIG. 2, the first operating system (OS1) 210 consumes the time resource allocated for tOS1 and then hands over control to the Virtual Machine Monitor (VMM) as a hypervisor so as to execute tasks necessary for driving hardware. After completing the operations necessary for driving hardware, the VMM hands over the control to the second operating system (OS2) 220. The second operating system 220 consumes the time resource allocated for tOS2. The second operating system 220 then hands over the control to the VMM. A method for each operating system to operate with the allocated time resource is described below with reference to FIG. 3.
FIG. 3 is a flowchart illustrating a method for an operating system to operate with an allocated time resource according to related art.
Referring to FIG. 3, the VMM for driving at least two operating systems starts operating in step 310. Here, the VMM may also be referred to as a hypervisor and control multiple operating systems running in a single host terminal.
The VMM creates a guest OS1 as the first operating system and fixes the weight of the resource allocated to the OS1 in step 320. The VMM creates a guest OS2 as the second operating system and fixes the weight of the resource allocated to the OS2 in step 330.
The VMM adjusts the time quantum per operating system in step 340. The VMM determines whether the scheduler has scheduled the OS1 or OS2 in step 350. If the OS1 has been scheduled, the OS1 runs in step 360. If the OS2 is scheduled, the OS2 runs in step 370.
In such a virtualization system, the time resource allocated according to the workload of the tasks executed in the individual operating systems may not be consumed completely. While one operating system is idle, the other operating system may be slacking due to the lack of resource. Such a situation is described with reference to FIG. 4.
FIG. 4 is a diagram illustrating behaviors of operating systems in a method according to related art.
Referring to FIG. 4, the time resource consumptions of the first operating system (General Purpose Operating System; GPOS) and the second operating system (Real Time Operating System; RTOS) vary according to the executed tasks. However, the time resources allocated to the respective operating systems are fixed to a predetermined amount. Accordingly, although the first operating system consumes a large amount of time while the second operating system consumes a small amount of time, there is no way to reallocate the remaining time resource allocated to the second operating system without consumption to the first operating system. Also, when the first operating system consumes a small amount of time while the second operating system uses a large amount of time, it is impossible for the second operating system to use the time resource allocated to the first operating system but not consumed.